﻿using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace VisionCloud.Core.Model.Sys
{
    [Table("SysUserDeviceTrace")]
    public class SysUserDeviceTrace
    {
        /// <summary>
        /// 用户Id
        /// </summary>
        public Guid UserId { get; set; }

        /// <summary>
        /// 创建者
        /// </summary>
        public Guid CreatedBy { get; set; }

        /// <summary>
        /// 创建日
        /// </summary>
        public DateTime CreatedDate { get; set; }

        /// <summary>
        /// 设备Id
        /// </summary>
        public Guid DeviceId { get; set; }

        /// <summary>
        /// 设备编号
        /// </summary>
        public string DeviceNumber { get; set; }

        /// <summary>
        /// 经度
        /// </summary>
        public double Longitude { get; set; }

        /// <summary>
        /// 纬度
        /// </summary>
        public double Latitude { get; set; }

        /// <summary>
        /// 详细地址
        /// </summary>
        public string Address { get; set; }

        /// <summary>
        /// 定位方式；0:小程序
        /// </summary>
        public int Type { get; set; }

        public string Province { get; set; }

        public string City { get; set; }

        public string District { get; set; }

        public string Township { get; set; }

        [NotMapped]
        public string CreatedDateStr { get => CreatedDate.ToString("yyyy-MM-dd HH:mm:ss"); }
    }
}